home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_qt.idb / usr / freeware / include / qxt.h.z / qxt.h
C/C++ Source or Header  |  2001-04-12  |  3KB  |  88 lines

  1. /****************************************************************************
  2. ** $Id: qt/extensions/xt/src/qxt.h   2.3.0   edited 2001-01-26 $
  3. **
  4. ** Definition of Qt extension classes for Xt/Motif support.
  5. **
  6. ** Created : 980107
  7. **
  8. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QXT_H
  39. #define QXT_H
  40.  
  41. #include <qapplication.h>
  42. #include <qwidget.h>
  43. #include <X11/Intrinsic.h>
  44.  
  45. class QXtApplication : public QApplication {
  46.     Q_OBJECT
  47.     void init();
  48. public:
  49.     QXtApplication(int& argc, char** argv,
  50.     const char* appclass=0,
  51.     XrmOptionDescRec *options=0, int num_options=0,
  52.     const char** resources=0);
  53.     QXtApplication(Display*);
  54.     QXtApplication(Display *, int, char **);
  55.     ~QXtApplication();
  56. };
  57.  
  58. class QXtWidget : public QWidget {
  59.     Q_OBJECT
  60.     Widget xtw;
  61.     Widget xtparent;
  62.     bool   need_reroot;
  63.     void init(const char* name, WidgetClass widget_class,
  64.             Widget parent, QWidget* qparent,
  65.             ArgList args, Cardinal num_args,
  66.             bool managed);
  67.     friend void qwidget_realize( Widget widget, XtValueMask* mask,
  68.                  XSetWindowAttributes* attributes );
  69.  
  70. public:
  71.     QXtWidget(const char* name, Widget parent, bool managed=FALSE);
  72.     QXtWidget(const char* name, WidgetClass widget_class,
  73.           QWidget *parent=0, ArgList args=0, Cardinal num_args=0,
  74.           bool managed=FALSE);
  75.     ~QXtWidget();
  76.  
  77.     Widget xtWidget() const { return xtw; }
  78.     bool isActiveWindow() const;
  79.     void setActiveWindow();
  80.  
  81. protected:
  82.     void moveEvent( QMoveEvent* );
  83.     void resizeEvent( QResizeEvent* );
  84.     bool x11Event( XEvent * );
  85. };
  86.  
  87. #endif
  88.